300
Can I add any break or divider line

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ScrollBySingleLine = .f.
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	h = var_Items.Add()
	' var_Items.ItemBreak(h) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemBreak(h) = 1"

	' var_Items.SelectableItem(h) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.ItemHeight(h) = 6
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 6"

	var_Items.Add("Item 3")

299
Can I change the default border of the tooltip, using your EBN files

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ToolTipDelay = 1
oList.ToolTipWidth = 364
oList.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oList.Template = "Background(64) = 16777216" // oList.Background(64) = 16777216
' oList.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oList.Columns.Add("tootip")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


298
Can I change the background color for the tooltip

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ToolTipDelay = 1
oList.ToolTipWidth = 364
oList.Template = "Background(65) = 255" // oList.Background(65) = 255
' oList.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oList.Columns.Add("tootip")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


297
Does the tooltip support HTML format

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ToolTipDelay = 1
oList.ToolTipWidth = 364
' oList.Columns.Add("tootip").ToolTip = "<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>"
var_Column = oList.Columns.Add("tootip")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ToolTip = `<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>`"


296
Can I change the forecolor for the tooltip

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ToolTipDelay = 1
oList.ToolTipWidth = 364
oList.Template = "Background(66) = 255" // oList.Background(66) = 255
' oList.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oList.Columns.Add("tootip")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


295
Can I change the foreground color for the tooltip

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ToolTipDelay = 1
oList.ToolTipWidth = 364
' oList.Columns.Add("tootip").ToolTip = "<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>"
var_Column = oList.Columns.Add("tootip")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ToolTip = `<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>`"


294
Is there any function to limit the height of the items when I display it using multiple lines

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ScrollBySingleLine = .t.
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellSingleLine(h,1) = False"

	' var_Items.ItemMaxHeight(h) = 48
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemMaxHeight(h) = 48"


293
Why I cannot center my cells in the column

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.DrawGridLines = -1
' oList.Columns.Add("Default").Alignment = 1
var_Column = oList.Columns.Add("Default")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.Alignment = 1"

oList.Items.Add("item 1")
oList.Items.Add("item 2")
oList.Items.Add("item 3")

292
How can I align the cell to the left, center or to the right

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.DrawGridLines = -1
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CellHAlignment(var_Items.Add("left"),0) = 0
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellHAlignment(Add(`left`),0) = 0"

	' var_Items.CellHAlignment(var_Items.Add("center"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellHAlignment(Add(`center`),0) = 1"

	' var_Items.CellHAlignment(var_Items.Add("right"),0) = 2
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellHAlignment(Add(`right`),0) = 2"


291
How do I apply HTML format to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oList.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oList.Template = "HTMLPicture(`p2`) = `c:\exontrol\images\auction.gif`" // oList.HTMLPicture("p2") = "c:\exontrol\images\auction.gif"
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("The following item shows some of the HTML format supported:")
	' var_Items.CellHAlignment(h,0) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,0) = 1"

	h = var_Items.Add("<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ")
	' var_Items.CaptionFormat(h,0) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,0) = 1"

	' var_Items.CellSingleLine(h,0) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellSingleLine(h,0) = False"


290
How can I change the font for a cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
oList.Items.Add("std font")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("this <font tahoma;12>is a bit of text with</font> a different font"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`this <font tahoma;12>is a bit of text with</font> a different font`),0) = 1"


289
How can I change the font for a cell

Dim f as P
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
oList.Items.Add("default font")
f = OLE.Create("StdFont")
	f.Name = "Tahoma"
	f.Size = 12
var_Items = oList.Items
	' var_Items.CellFont(var_Items.Add("new font"),0) = f
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellFont(Add(`new font`),0) = f"


288
How can I change the font for entire item

Dim f as P
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
oList.Items.Add("default font")
f = OLE.Create("StdFont")
	f.Name = "Tahoma"
	f.Size = 12
var_Items = oList.Items
	' var_Items.ItemFont(var_Items.Add("new font")) = f
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemFont(Add(`new font`)) = f"


287
How do I vertically align a cell

Dim h as 
Dim oList as P
Dim var_Column as local
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.DrawGridLines = -1
' oList.Columns.Add("MultipleLine").Def(16) = .f.
var_Column = oList.Columns.Add("MultipleLine")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.Def(16) = False"

oList.Columns.Add("VAlign")
var_Items = oList.Items
	h = var_Items.Add("This is a bit of long text that should break the line")
	' var_Items.Caption(h,1) = "top"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `top`"

	' var_Items.CellVAlignment(h,1) = 0
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellVAlignment(h,1) = 0"

	h = var_Items.Add("This is a bit of long text that should break the line")
	' var_Items.Caption(h,1) = "middle"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `middle`"

	' var_Items.CellVAlignment(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellVAlignment(h,1) = 1"

	h = var_Items.Add("This is a bit of long text that should break the line")
	' var_Items.Caption(h,1) = "bottom"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `bottom`"

	' var_Items.CellVAlignment(h,1) = 2
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellVAlignment(h,1) = 2"


286
How can I change the position of an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	' var_Items.ItemPosition(var_Items.Add("Item 3")) = 0
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemPosition(Add(`Item 3`)) = 0"


285
How do I find an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.ItemBold(var_Items.FindItem("Item 2",0)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(FindItem(`Item 2`,0)) = True"


284
How can I insert a hyperlink or an anchor element

Dim oList as P
Dim var_Items as P
Dim var_Items1 as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Column")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("Just an <a1>anchor</a> element ..."),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`Just an <a1>anchor</a> element ...`),0) = 1"

var_Items1 = oList.Items
	' var_Items1.CaptionFormat(var_Items1.Add("Just another <a2>anchor</a> element ..."),0) = 1
	oList.TemplateDef = "dim var_Items1"
	oList.TemplateDef = var_Items1
	oList.Template = "var_Items1.CaptionFormat(Add(`Just another <a2>anchor</a> element ...`),0) = 1"


283
How do I find the handle of the item based on its index

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.ItemBold(1) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(1) = True"


282
How can I find the cell being clicked in a radio group

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.MarkSearchColumn = .f.
oList.SelBackColor = 8454143
oList.SelForeColor = 0
oList.Columns.Add("C1")
oList.Columns.Add("C2")
oList.Columns.Add("C3")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Radio 1"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.Caption(h,2) = "Radio 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellState(h,1) = 1"

	var_Items.CellChecked(1234,i,c)
	' var_Items.CellBold(i,c) = .t.
	oList.TemplateDef = "dim var_Items,i,c"
	oList.TemplateDef = var_Items
	oList.TemplateDef = i
	oList.TemplateDef = c
	oList.Template = "var_Items.CellBold(i,c) = True"


281
Can I let the user to resize at runtime the specified item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ScrollBySingleLine = .t.
oList.DrawGridLines = -1
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemAllowSizing(var_Items.Add("resizable item")) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemAllowSizing(Add(`resizable item`)) = True"

	var_Items.Add("not resizable item")

280
How can I change the size ( width, height ) of the picture

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	' var_Items.CellPicture(h,0) = oList.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.CellPictureWidth(h,0) = 24
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPictureWidth(h,0) = 24"

	' var_Items.CellPictureHeight(h,0) = 24
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPictureHeight(h,0) = 24"

	' var_Items.ItemHeight(h) = 32
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 32"

	h = var_Items.Add("Item 2")
	' var_Items.CellPicture(h,0) = oList.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 48"


279
How can I find the number or the count of selected items

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.SingleSel = .f.
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.SelectItem(var_Items.FirstVisibleItem) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.SelectItem(FirstVisibleItem) = True"

	' var_Items.SelectItem(var_Items.NextVisibleItem(var_Items.FirstVisibleItem)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.SelectItem(NextVisibleItem(FirstVisibleItem)) = True"

	var_Items.Add(var_Items.SelectCount)

278
How do I unselect an item

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.SelectItem(h) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.SelectItem(h) = False"


277
How do I find the selected item

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.SelectItem(h) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.SelectItem(h) = True"

	' var_Items.ItemBold(var_Items.SelectedItem(0)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(SelectedItem(0)) = True"


276
How do I un select all items

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.SingleSel = .f.
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	var_Items.UnselectAll()

275
How do I select multiple items

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.SingleSel = .f.
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.SelectItem(var_Items.FirstVisibleItem) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.SelectItem(FirstVisibleItem) = True"

	' var_Items.SelectItem(var_Items.NextVisibleItem(var_Items.FirstVisibleItem)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.SelectItem(NextVisibleItem(FirstVisibleItem)) = True"


274
How do I select all items

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.SingleSel = .f.
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	var_Items.SelectAll()

273
How do I select an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.SelectItem(var_Items.NextVisibleItem(var_Items.FocusItem)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.SelectItem(NextVisibleItem(FocusItem)) = True"


272
Can I display a button with some picture or icon inside

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oList.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = " Button <img>p1</img> "
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = ` Button <img>p1</img> `"

	' var_Items.CaptionFormat(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasButton(h,1) = True"

	' var_Items.ItemHeight(h) = 48
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 48"


271
Can I display a button with some picture or icon inside

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = " Button <img>1</img> "
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = ` Button <img>1</img> `"

	' var_Items.CaptionFormat(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasButton(h,1) = True"


270
Can I display a button with some icon inside

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = " <img>1</img> "
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = ` <img>1</img> `"

	' var_Items.CaptionFormat(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasButton(h,1) = True"


269
How can I assign multiple icon/picture to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oList.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oList.Template = "HTMLPicture(`p2`) = `c:\exontrol\images\auction.gif`" // oList.HTMLPicture("p2") = "c:\exontrol\images\auction.gif"
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("text <img>p1</img> another picture <img>p2</img> and so on")
	' var_Items.CaptionFormat(h,0) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,0) = 1"

	' var_Items.CellPicture(h,0) = oList.ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)")
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\colorize.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 48"

	var_Items.Add("Item 2")

268
How can I assign an icon/picture to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	' var_Items.CellPicture(h,0) = oList.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 48"

	var_Items.Add("Item 2")

267
How can I assign multiple icons/pictures to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item <img>1</img> 1, <img>2</img>, ... and so on ")
	' var_Items.CaptionFormat(h,0) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CaptionFormat(h,0) = 1"


266
How can I assign multiple icons/pictures to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	' var_Items.CellImages(h,0) = "1,2,3"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellImages(h,0) = `1,2,3`"


265
How can I assign an icon/picture to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	' var_Items.CellImage(h,0) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellImage(h,0) = 1"

	' var_Items.CellImage(var_Items.Add("Item 2"),0) = 2
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellImage(Add(`Item 2`),0) = 2"

	' var_Items.CellImage(var_Items.Add("Item 3"),0) = 3
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellImage(Add(`Item 3`),0) = 3"


264
How can I display a button inside the item or cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = " Button 1 "
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = ` Button 1 `"

	' var_Items.CellHAlignment(h,1) = 2
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasButton(h,1) = True"

	h = var_Items.Add("Cell 2")
	' var_Items.Caption(h,1) = " Button 2 "
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = ` Button 2 `"

	' var_Items.CellHAlignment(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHAlignment(h,1) = 1"

	' var_Items.CellHasButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasButton(h,1) = True"


263
How can I change the state of a radio button

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.MarkSearchColumn = .f.
oList.SelBackColor = 8454143
oList.SelForeColor = 0
oList.Columns.Add("C1")
oList.Columns.Add("C2")
oList.Columns.Add("C3")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Radio 1"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.Caption(h,2) = "Radio 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellState(h,1) = 1"


262
How can I assign a radio button to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.MarkSearchColumn = .f.
oList.SelBackColor = 8454143
oList.SelForeColor = 0
oList.Columns.Add("C1")
oList.Columns.Add("C2")
oList.Columns.Add("C3")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Radio 1"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.Caption(h,2) = "Radio 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellState(h,1) = 1"


261
How can I change the state of a checkbox

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Check Box"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Check Box`"

	' var_Items.CellHasCheckBox(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasCheckBox(h,1) = True"

	' var_Items.CellState(h,1) = 1
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellState(h,1) = 1"


260
How can I assign a checkbox to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Check Box"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Check Box`"

	' var_Items.CellHasCheckBox(h,1) = .t.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellHasCheckBox(h,1) = True"


259
How can I display an item or a cell on multiple lines

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ScrollBySingleLine = .t.
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "This is bit of text that's shown on multiple lines"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `This is bit of text that's shown on multiple lines`"

	' var_Items.CellSingleLine(h,1) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellSingleLine(h,1) = False"


258
How can I assign a tooltip to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "tooltip"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `tooltip`"

	' var_Items.CellToolTip(h,1) = "This is bit of text that's shown when the user hovers the cell"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellToolTip(h,1) = `This is bit of text that's shown when the user hovers the cell`"


257
How can I associate an extra data to a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Cell 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 2`"

	' var_Items.CellData(h,1) = "your extra data"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellData(h,1) = `your extra data`"


256
How do I enable or disable a cell

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Cell 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 2`"

	' var_Items.CellEnabled(h,1) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellEnabled(h,1) = False"


255
How do I change the cell's foreground color

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Cell 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 2`"

	' var_Items.CellForeColor(h,1) = 255
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellForeColor(h,1) = 255"


254
How do I change the visual effect for the cell, using your EBN files

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Cell 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 2`"

	' var_Items.CellBackColor(h,1) = 16777216
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellBackColor(h,1) = 16777216"


253
How do I change the cell's background color

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	h = var_Items.Add("Cell 1")
	' var_Items.Caption(h,1) = "Cell 2"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 2`"

	' var_Items.CellBackColor(h,1) = 255
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.CellBackColor(h,1) = 255"


252
How do I change the caption or value for a particular cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	' var_Items.Caption(var_Items.Add("Cell 1"),1) = "Cell 2"
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.Caption(Add(`Cell 1`),1) = `Cell 2`"


251
How do I retrieve the focused item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("Item 1")
	var_Items.Add("Item 2")
	var_Items.Add("Item 3")
	' var_Items.ItemBold(var_Items.FocusItem) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(FocusItem) = True"


250
How do I enumerate the visible items

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	h = var_Items.Add("Item 1")
	h = var_Items.Add("Item 2")
	' var_Items.ItemBold(var_Items.FirstVisibleItem) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(FirstVisibleItem) = True"

	' var_Items.ItemBold(var_Items.NextVisibleItem(var_Items.FirstVisibleItem)) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(NextVisibleItem(FirstVisibleItem)) = True"


249
How can I make an item unselectable, or not selectable

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Column")
var_Items = oList.Items
	h = var_Items.Add("unselectable - you can't get selected")
	' var_Items.SelectableItem(h) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.SelectableItem(h) = False"

	var_Items.Add("selectable")

248
How can I hide or show an item

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Column")
var_Items = oList.Items
	h = var_Items.Add("hidden")
	' var_Items.ItemHeight(h) = 0
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.ItemHeight(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.SelectableItem(h) = False"

	var_Items.Add("visible")

247
How can I change the height for all items

Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.DefaultItemHeight = 32
oList.Columns.Add("Column")
oList.Items.Add("One")
oList.Items.Add("Two")

246
How do I change the height of an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.ScrollBySingleLine = .t.
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemHeight(var_Items.Add("height")) = 128
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemHeight(Add(`height`)) = 128"

oList.Items.Add("enabled")

245
How do I disable or enable an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.EnableItem(var_Items.Add("disabled")) = .f.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.EnableItem(Add(`disabled`)) = False"

oList.Items.Add("enabled")

244
How do I display as strikeout a cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CellStrikeOut(var_Items.Add("strikeout"),0) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellStrikeOut(Add(`strikeout`),0) = True"


243
How do I display as strikeout a cell or an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("gets <s>strikeout</s> only a portion of text"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`gets <s>strikeout</s> only a portion of text`),0) = 1"


242
How do I display as strikeout an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemStrikeOut(var_Items.Add("strikeout")) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemStrikeOut(Add(`strikeout`)) = True"


241
How do I underline a cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CellUnderline(var_Items.Add("underline"),0) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellUnderline(Add(`underline`),0) = True"


240
How do I underline a cell or an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("gets <u>underline</u> only a portion of text"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`gets <u>underline</u> only a portion of text`),0) = 1"


239
How do I underline an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemUnderline(var_Items.Add("underline")) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemUnderline(Add(`underline`)) = True"


238
How do I display as italic a cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CellItalic(var_Items.Add("italic"),0) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellItalic(Add(`italic`),0) = True"


237
How do I display as italic a cell or an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("gets <i>italic</i> only a portion of text"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`gets <i>italic</i> only a portion of text`),0) = 1"


236
How do I display as italic an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemItalic(var_Items.Add("italic")) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemItalic(Add(`italic`)) = True"


235
How do I bold a cell

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CellBold(var_Items.Add("bold"),0) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CellBold(Add(`bold`),0) = True"


234
How do I bold a cell or an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.CaptionFormat(var_Items.Add("gets <b>bold</b> only a portion of text"),0) = 1
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.CaptionFormat(Add(`gets <b>bold</b> only a portion of text`),0) = 1"


233
How do I bold an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemBold(var_Items.Add("bold")) = .t.
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBold(Add(`bold`)) = True"


232
How do I change the foreground color for the item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemForeColor(var_Items.Add("Item")) = 255
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemForeColor(Add(`Item`)) = 255"


231
How do I change the visual appearance for the item, using your EBN technology

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemBackColor(var_Items.Add("Item")) = 16777216
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBackColor(Add(`Item`)) = 16777216"


230
How do I change the background color for the item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemBackColor(var_Items.Add("Item")) = 255
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemBackColor(Add(`Item`)) = 255"


229
How do I associate an extra data to an item

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
var_Items = oList.Items
	' var_Items.ItemData(var_Items.Add("item")) = "your extra data"
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.ItemData(Add(`item`)) = `your extra data`"


228
How do I programmatically edit a cell

' Occurs after data in the current cell is edited.
function AfterCellEdit as v (ItemIndex  as  N,ColIndex  as  N,NewCaption  as  C)
	Dim var_Items as P
	oList = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oList.Items
		' var_Items.Caption(ItemIndex,ColIndex) = NewCaption
		oList.TemplateDef = "dim var_Items,ItemIndex,ColIndex"
		oList.TemplateDef = var_Items
		oList.TemplateDef = ItemIndex
		oList.TemplateDef = ColIndex
		oList.Template = "var_Items.Caption(ItemIndex,ColIndex) = NewCaption"

end function

' Occurs if the edit operation is canceled.
function CancelCellEdit as v (ItemIndex  as  N,ColIndex  as  N,Reserved  as  A)
	Dim var_Items as P
	oList = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oList.Items
		' var_Items.Caption(ItemIndex,ColIndex) = Reserved
		oList.TemplateDef = "dim var_Items,ItemIndex,ColIndex"
		oList.TemplateDef = var_Items
		oList.TemplateDef = ItemIndex
		oList.TemplateDef = ColIndex
		oList.Template = "var_Items.Caption(ItemIndex,ColIndex) = Reserved"

end function

' Occurs when the user presses and then releases the left mouse button over the list control.
function Click as v ()
	Dim var_Items as P
	oList = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oList.Items
		var_Items.Edit(var_Items.FocusItem,0)
end function

Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.AllowEdit = .t.
oList.Columns.Add("Default")
var_Items = oList.Items
	var_Items.Add("")

227
How can I ensure or scroll the control so the item fits the control's client area

Dim h as 
Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
h = oList.Items.Add("item")
oList.Items.EnsureVisibleItem(h)

226
How can I remove or delete all items
Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
oList.Items.Add("removed item")
oList.Items.RemoveAll()

225
How can I remove or delete an item
Dim h as 
Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
h = oList.Items.Add("removed item")
oList.Items.Remove(h)

224
How can I add or insert an item

Dim h as 
Dim oList as P
Dim var_Items as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("C1")
oList.Columns.Add("C2")
var_Items = oList.Items
	' var_Items.Caption(var_Items.Add("Cell 1"),1) = "Cell 2"
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.Caption(Add(`Cell 1`),1) = `Cell 2`"

	h = var_Items.Add("Cell 3")
	' var_Items.Caption(h,1) = "Cell 4"
	oList.TemplateDef = "dim var_Items,h"
	oList.TemplateDef = var_Items
	oList.TemplateDef = h
	oList.Template = "var_Items.Caption(h,1) = `Cell 4`"


223
How can I add or insert an item

Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("Default")
oList.Items.Add("new item")

222
How can I get the columns as they are shown in the control's sortbar
Dim oList as P
Dim var_Object as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_Object = oList.Columns.ItemBySortPosition(0)

221
How can I access the properties of a column

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("A")
' oList.Columns.Item("A").HeaderBold = .t.
var_Column = oList.Columns.Item("A")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.HeaderBold = True"


220
How can I remove all the columns
Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Clear()

219
How can I remove a column
Dim oList as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Remove("A")

218
How can I get the number or the count of columns
Dim oList as P
Dim var_Count as 

oList = topparent:CONTROL_ACTIVEX1.activex
var_Count = oList.Columns.Count

217
How can I change the font for all cells in the entire column

Dim f as P
Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
f = OLE.Create("StdFont")
	f.Name = "Tahoma"
	f.Size = 12
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.Font = f
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

216
How can I change the background color for all cells in the column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.BackColor = 255
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

215
How can I change the foreground color for all cells in the column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.ForeColor = 255
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

214
How can I show as strikeout all cells in the column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.StrikeOut = .t.
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

213
How can I underline all cells in the column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.Underline = .t.
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

212
How can I show in italic all data in the column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.Italic = .t.
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

211
How can I bold the entire column

Dim oList as P
Dim var_ConditionalFormat as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)

210
How can I display a computed column and highlight some values that are negative or less than a value

Dim oList as P
Dim var_Column as local
Dim var_ConditionalFormat as P
Dim var_Items as P
Dim var_Items1 as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("A")
oList.Columns.Add("B")
' oList.Columns.Add("(A+B)*1.19").ComputedField = "(%0 + %1) * 1.19"
var_Column = oList.Columns.Add("(A+B)*1.19")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ComputedField = `(%0 + %1) * 1.19`"

var_Items = oList.Items
	' var_Items.Caption(var_Items.Add(1),1) = 2
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.Caption(Add(1),1) = 2"

var_Items1 = oList.Items
	' var_Items1.Caption(var_Items1.Add(10),1) = 20
	oList.TemplateDef = "dim var_Items1"
	oList.TemplateDef = var_Items1
	oList.Template = "var_Items1.Caption(Add(10),1) = 20"

var_ConditionalFormat = oList.ConditionalFormats.Add("%2 > 10")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ForeColor = 255
	var_ConditionalFormat.ApplyTo = 2 '2 + 

209
Can I display a computed column so it displays the VAT, or SUM

Dim oList as P
Dim var_Column as local
Dim var_Items as P
Dim var_Items1 as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("A")
oList.Columns.Add("B")
' oList.Columns.Add("(A+B)*1.19").ComputedField = "(%0 + %1) * 1.19"
var_Column = oList.Columns.Add("(A+B)*1.19")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ComputedField = `(%0 + %1) * 1.19`"

var_Items = oList.Items
	' var_Items.Caption(var_Items.Add(1),1) = 2
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.Caption(Add(1),1) = 2"

var_Items1 = oList.Items
	' var_Items1.Caption(var_Items1.Add(10),1) = 20
	oList.TemplateDef = "dim var_Items1"
	oList.TemplateDef = var_Items1
	oList.Template = "var_Items1.Caption(Add(10),1) = 20"


208
How can I show a column that adds values in the cells

Dim oList as P
Dim var_Column as local
Dim var_Items as P
Dim var_Items1 as P

oList = topparent:CONTROL_ACTIVEX1.activex
oList.Columns.Add("A")
oList.Columns.Add("B")
' oList.Columns.Add("A+B").ComputedField = "%0 + %1"
var_Column = oList.Columns.Add("A+B")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.ComputedField = `%0 + %1`"

var_Items = oList.Items
	' var_Items.Caption(var_Items.Add(1),1) = 2
	oList.TemplateDef = "dim var_Items"
	oList.TemplateDef = var_Items
	oList.Template = "var_Items.Caption(Add(1),1) = 2"

var_Items1 = oList.Items
	' var_Items1.Caption(var_Items1.Add(10),1) = 20
	oList.TemplateDef = "dim var_Items1"
	oList.TemplateDef = var_Items1
	oList.Template = "var_Items1.Caption(Add(10),1) = 20"


207
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters

Dim oList as P
Dim var_Column as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_Column = oList.Columns.Add("Filter")
	var_Column.FilterOnType = .t.
	var_Column.DisplayFilterButton = .t.
	var_Column.AutoSearch = 1
oList.Items.Add("Canada")
oList.Items.Add("USA")

206
Is there any function to filter the control's data as I type, something like filter on type

Dim oList as P
Dim var_Column as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_Column = oList.Columns.Add("Filter")
	var_Column.FilterOnType = .t.
	var_Column.DisplayFilterButton = .t.
oList.Items.Add("Canada")
oList.Items.Add("USA")

205
How can I programmatically filter a column

Dim oList as P
Dim var_Column as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_Column = oList.Columns.Add("Filter")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 2
oList.Items.Add()
oList.Items.Add("not empty")
oList.ApplyFilter()

204
How can I show or display the control's filter

Dim oList as P
Dim var_Column as local

oList = topparent:CONTROL_ACTIVEX1.activex
' oList.Columns.Add("Filter").DisplayFilterButton = .t.
var_Column = oList.Columns.Add("Filter")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.DisplayFilterButton = True"


203
How can I customize the items being displayed in the drop down filter window

Dim oList as P
Dim var_Column as P

oList = topparent:CONTROL_ACTIVEX1.activex
var_Column = oList.Columns.Add("Custom Filter")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.CustomFilter = "Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.txt|*.log"
	var_Column.FilterType = 3
	var_Column.Filter = "*.xls"
oList.Items.Add("excel.xls")
oList.Items.Add("word.doc")
oList.Items.Add("pp.pps")
oList.Items.Add("text.txt")
oList.ApplyFilter()

202
How can I change the order or the position of the columns in the sort bar

Dim oList as P
Dim var_Column as local
Dim var_Column1 as local

oList = topparent:CONTROL_ACTIVEX1.activex
oList.SortBarVisible = .t.
oList.SortBarColumnWidth = 48
' oList.Columns.Add("C1").SortOrder = 1
var_Column = oList.Columns.Add("C1")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.SortOrder = 1"

' oList.Columns.Add("C2").SortOrder = 2
var_Column1 = oList.Columns.Add("C2")
oList.TemplateDef = "dim var_Column1"
oList.TemplateDef = var_Column1
oList.Template = "var_Column1.SortOrder = 2"

oList.Columns.Item("C2").SortPosition = 0

201
How do I arrange my columns on multiple levels

Dim oList as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Column3 as local
Dim var_Column4 as local
Dim var_Column5 as local
Dim var_Column6 as local
Dim var_Column7 as local
Dim var_Column8 as local

oList = topparent:CONTROL_ACTIVEX1.activex
' oList.Columns.Add("S").Width = 32
var_Column = oList.Columns.Add("S")
oList.TemplateDef = "dim var_Column"
oList.TemplateDef = var_Column
oList.Template = "var_Column.Width = 32"

' oList.Columns.Add("Level 2").LevelKey = 1
var_Column1 = oList.Columns.Add("Level 2")
oList.TemplateDef = "dim var_Column1"
oList.TemplateDef = var_Column1
oList.Template = "var_Column1.LevelKey = 1"

' oList.Columns.Add("Level 3").LevelKey = 1
var_Column2 = oList.Columns.Add("Level 3")
oList.TemplateDef = "dim var_Column2"
oList.TemplateDef = var_Column2
oList.Template = "var_Column2.LevelKey = 1"

' oList.Columns.Add("Level 4").LevelKey = 1
var_Column3 = oList.Columns.Add("Level 4")
oList.TemplateDef = "dim var_Column3"
oList.TemplateDef = var_Column3
oList.Template = "var_Column3.LevelKey = 1"

' oList.Columns.Add("Level 1").LevelKey = "2"
var_Column4 = oList.Columns.Add("Level 1")
oList.TemplateDef = "dim var_Column4"
oList.TemplateDef = var_Column4
oList.Template = "var_Column4.LevelKey = `2`"

' oList.Columns.Add("Level 2").LevelKey = "2"
var_Column5 = oList.Columns.Add("Level 2")
oList.TemplateDef = "dim var_Column5"
oList.TemplateDef = var_Column5
oList.Template = "var_Column5.LevelKey = `2`"

' oList.Columns.Add("Level 3").LevelKey = "2"
var_Column6 = oList.Columns.Add("Level 3")
oList.TemplateDef = "dim var_Column6"
oList.TemplateDef = var_Column6
oList.Template = "var_Column6.LevelKey = `2`"

' oList.Columns.Add("Level 4").LevelKey = "2"
var_Column7 = oList.Columns.Add("Level 4")
oList.TemplateDef = "dim var_Column7"
oList.TemplateDef = var_Column7
oList.Template = "var_Column7.LevelKey = `2`"

' oList.Columns.Add("E").Width = 32
var_Column8 = oList.Columns.Add("E")
oList.TemplateDef = "dim var_Column8"
oList.TemplateDef = var_Column8
oList.Template = "var_Column8.Width = 32"